package practice4.aop.advice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

import practice4.aop.domain.Audience;

public class AudienceAroundAdvice implements MethodInterceptor {
	public Object invoke(MethodInvocation invocation) throws Throwable {
			audience.takeSeats();
			audience.turnOffCellPhones();
			Object returnValue = invocation.proceed();
			audience.clip();
			return returnValue;
	}

	// injected
	private Audience audience;  
	public void setAudience(Audience audience) {
		this.audience = audience;
	}
}
